<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <%= csrf_meta_tag %>
  <title><%= cms_title %></title>

  <%= stylesheet_link_tag 'slices/slices' %>
  <%= javascript_include_tag 'slices/slices' %>
  <%= render "admin/shared/asset_storage" %>

  <meta name="robots" content="noindex, nofollow">
  <script type="text/javascript">
    $(function() {
      <%= yield :js_head %>
    });
  </script>
</head>
<body class="<%= body_class_from_controller %>">
  <div class="jqmWindow modal" id="general-modal"></div>
  <div id="server-communication">Loading...</div>

  <div id="container">
    <header id="layout">
      <% if admin_signed_in? -%>
        <ul>
          <li><%= current_admin.email %></li>
          <%= render_custom_links %>
          <li><%= link_to "View Site", root_path, target: "_blank" %></li>
          <li><%= link_to "Account", admin_admin_path(current_admin) %></li>
          <li><%= link_to "Log out", destroy_admin_session_path %></li>
        </ul>
      <% end -%>
      <nav>
        <ul>
          <% if admin_signed_in? -%>
            <%= render('admin/shared/navigation')  %>
          <% else -%>
            <li>&nbsp;</li>
          <% end -%>
        </ul>
      </nav>
    </header>

    <%= yield %>
  </div>

  <script type="text/html" id="livefield-result-template">
    <li data-value="{{path}}">
      <span class="name">{{name}}</span>
      <span class="path">{{path}}</span>
    </li>
  </script>
</body>
</html>
